<template>
  <el-menu
    style="min-height: 100%; overflow-x: hidden"
    background-color="rgb(48, 65, 86)"
    text-color="#fff"
    active-text-color="#ffd04b"
    :collapse-transition="false"
    router
    @select="handleSelect"
  >
    <div style="height: 60px; line-height: 60px; text-align: center">
      <img
        src="../assets/logo.png"
        alt=""
        style="width: 20px; position: relative; top: 5px; margin-right: 5px"
      />
      <b style="color: white">平潭专题系统</b>
    </div>
    <el-menu-item index="/home">
      <template slot="title">
        <i class="el-icon-house"></i>
        <span slot="title">主页展示</span>
      </template>
    </el-menu-item>
    <el-submenu index="2">
      <template slot="title">
        <i class="el-icon-menu"></i>
        <span slot="title">食品安全</span>
      </template>
      <el-menu-item index="/foodSafety">
        <i class="el-icon-s-operation"></i>
        <span slot="title">展示</span>
      </el-menu-item>
      <el-menu-item index="/foodSupervise">
        <i class="el-icon-s-operation"></i>
        <span slot="title">监督检查</span>
      </el-menu-item>
      <el-menu-item index="/foodSafetyTable">
        <i class="el-icon-s-operation"></i>
        <span slot="title">表格</span>
      </el-menu-item>
    </el-submenu>
    <el-submenu index="3">
      <template slot="title">
        <i class="el-icon-menu"></i>
        <span slot="title">信用监管</span>
      </template>
      <el-menu-item index="/credit">
        <i class="el-icon-s-operation"></i>
        <span slot="title">展示</span>
      </el-menu-item>
      <el-menu-item index="/creditTable">
        <i class="el-icon-s-operation"></i>
        <span slot="title">表格</span>
      </el-menu-item>
    </el-submenu>
    <el-submenu index="4">
      <template slot="title">
        <i class="el-icon-menu"></i>
        <span slot="title">行政执法</span>
      </template>
      <el-menu-item index="/administration">
        <i class="el-icon-s-operation"></i>
        <span slot="title">展示</span>
      </el-menu-item>
      <el-menu-item index="/administrationTable">
        <i class="el-icon-s-operation"></i>
        <span slot="title">表格</span>
      </el-menu-item>
    </el-submenu>
    <el-submenu index="5">
      <template slot="title">
        <i class="el-icon-menu"></i>
        <span slot="title">一品一码</span>
      </template>
      <el-menu-item index="/product">
        <i class="el-icon-s-operation"></i>
        <span slot="title">展示</span>
      </el-menu-item>
      <el-menu-item index="/productTable">
        <i class="el-icon-s-operation"></i>
        <span slot="title">表格</span>
      </el-menu-item>
    </el-submenu>
    <el-submenu index="6">
      <template slot="title">
        <i class="el-icon-menu"></i>
        <span slot="title">移动应用</span>
      </template>
      <el-menu-item index="/mobile">
        <i class="el-icon-s-operation"></i>
        <span slot="title">地图</span>
      </el-menu-item>
    </el-submenu>
  </el-menu>
</template>

<script>
export default {
  name: "Aside",
  data() {
    return {
      msg: "Welcome to Your Vue.js App"
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
    handleSelect() {}
  }
};
</script>
